home *** CD-ROM | disk | FTP | other *** search
- /* MacCalendar.h */
- /*
- * MacCalendar.h
- * Copyright © 1993-94 Apple Computer Inc. All rights reserved.
- *
- * Edit History:
- * 1.0d0 MM First "public" distribution.
- * 1.0d1 MM Added the setup application.
- * 1.0d2 MM Added balloon help to the setup dialog. Added a "can't
- * find preference file alert." No substantive changes.
- * 1.0d3 MM Some small fixes from the Status Bar author. Now hiliting
- * the days of the week and today's date if shown.
- * 1.0d4 MM Revised to use the current ControlStrip header file. Removed
- * references to a local copy of Icons.h as the Universal Header
- * distribution has this information. Shrunk next/last month buttons.
- * Make a copy of the intlHdl so we don't change the system info.
- * 1.0d5 MM Bug displaying October 1994 - blank first line.
- * 1.0d6 MM Redid drawing routine.
- */
- #define kApplicationCreator 'SCAL'
- #define ICON_Calendar 128
- #define ICON_StatusBar 256
- #define FREF_Calendar 128
- #define BNDL_Calendar 128
- #define STRN_Info 256
- #define PICT_RightArrow 128
- #define kIconWidth 16
- #define kVersionMajor 1
- #define kVersionMinor 0
- #define kVersionStage development
- #define kVersionRelease 5
- #define kVersionIdent "1.0d5"
- #define kVersionString "1.0d5 © 1993-94 Apple Computer Inc."
- #define kCalendarPrefName "MacCalendar Preferences" /* No \p */
- #define kFirstIsSunday 1
- #define kFirstIsMonday 2
- #ifndef REZ
- #ifndef FALSE
- #define FALSE 0
- #define TRUE 1
- #endif
-
- /*
- * This is saved across restarts - it is set from "factory settings" if no
- * preference resource is found in the Status Bar preference file, and can
- * be changed by the MacCalendarSetup application.
- */
- typedef struct SavedSettings {
- OSType signature; /* Our signature */
- OSType prefVersion; /* Preference revision level */
- Str255 dateString; /* Current date label string */
- Str255 fontName; /* Requested display font */
- short fontSize; /* Display font size */
- short firstDayOfWeek; /* Sunday == 1 */
- } SavedSettings, **SavedSettingsHandle;
-
- /*
- * The value of kPrefVersion has no special significance. It should be changed
- * whenever the SavedSettings resource is changed, or whenever it you desire to
- * redefine the SavedSettings resource (for example, during debugging).
- */
- #define kPrefVersion ('1004') /* Change this to rebuild pref's */
- enum {
- kStringPreference = 1,
- kStringHelp,
- kStringFontName,
- kStringFontSize,
- kStringFirstDayOfWeek,
- kStringDayNames
- };
-
- enum {
- kMsgReadingPrefResource,
- kMsgWritingPrefResource,
- kMsgSystemError
- };
-
- /*
- * These functions are defined in DrawCalendar.c. They are not specific to
- * the Status Bar module interface.
- */
- /*
- * DrawCalendar draws the current calendar in the current port in the specified
- * display area.
- */
- void DrawCalendar(
- short year, /* 1904 .. */
- short month, /* January == 1 */
- short firstDayOfWeek, /* Sunday = 1, Monday 2 */
- const unsigned char *dayName, /* Day of week string */
- const Rect *displayRect, /* Where to draw the text */
- short fontNumber, /* Display font */
- short fontSize /* Display font size */
- );
- /*
- * GetCalendarDisplaySize returns the size of the calendar if it is to be drawn
- * in the specified fontNumber and fontSize.
- */
- Point GetCalendarDisplaySize(
- short fontNumber, /* Display font */
- short fontSize /* Display font size */
- );
- /*
- * GetCalendarMonthRect uses the fontNumber and fontSize to compute the size
- * size of the calendar as it will be drawn. Then the function creates an
- * actual display rectangle that is centered in the specified displayRect.
- */
- void GetCalendarMonthRect(
- short fontNumber, /* Display font */
- short fontSize, /* Display font size */
- const Rect *displayRect, /* Where to draw the text */
- Rect *monthRect /* Returns drawing rect */
- );
- #endif /* REZ */
-
-